<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Caffe: caffe::SyncedMemory Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Caffe
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecaffe.html">caffe</a></li><li class="navelem"><a class="el" href="classcaffe_1_1SyncedMemory.html">SyncedMemory</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcaffe_1_1SyncedMemory-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">caffe::SyncedMemory Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Manages memory allocation and synchronization between the host (CPU) and device (GPU).  
 <a href="classcaffe_1_1SyncedMemory.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="syncedmem_8hpp_source.html">syncedmem.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aa9d505f04322f6e521a57b8fc51dfba1"><td class="memItemLeft" align="right" valign="top"><a id="aa9d505f04322f6e521a57b8fc51dfba1"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>SyncedHead</b> { <b>UNINITIALIZED</b>, 
<b>HEAD_AT_CPU</b>, 
<b>HEAD_AT_GPU</b>, 
<b>SYNCED</b>
 }</td></tr>
<tr class="separator:aa9d505f04322f6e521a57b8fc51dfba1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a858ddd33252ddfd6e8bb2dc59ab7691b"><td class="memItemLeft" align="right" valign="top"><a id="a858ddd33252ddfd6e8bb2dc59ab7691b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>SyncedMemory</b> (size_t size)</td></tr>
<tr class="separator:a858ddd33252ddfd6e8bb2dc59ab7691b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ffa0255e243f223e1af064fb7322ae4"><td class="memItemLeft" align="right" valign="top"><a id="a5ffa0255e243f223e1af064fb7322ae4"></a>
const void *&#160;</td><td class="memItemRight" valign="bottom"><b>cpu_data</b> ()</td></tr>
<tr class="separator:a5ffa0255e243f223e1af064fb7322ae4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4118cdf888d8663c4f88c037ce3e3b8e"><td class="memItemLeft" align="right" valign="top"><a id="a4118cdf888d8663c4f88c037ce3e3b8e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_cpu_data</b> (void *data)</td></tr>
<tr class="separator:a4118cdf888d8663c4f88c037ce3e3b8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf04d9fabcde73902bdad08672696933"><td class="memItemLeft" align="right" valign="top"><a id="acf04d9fabcde73902bdad08672696933"></a>
const void *&#160;</td><td class="memItemRight" valign="bottom"><b>gpu_data</b> ()</td></tr>
<tr class="separator:acf04d9fabcde73902bdad08672696933"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d3831fe6c03370890d76dc8a82f4ca1"><td class="memItemLeft" align="right" valign="top"><a id="a9d3831fe6c03370890d76dc8a82f4ca1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_gpu_data</b> (void *data)</td></tr>
<tr class="separator:a9d3831fe6c03370890d76dc8a82f4ca1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab32cd46d7f0cf524d79e4ba7da7449dd"><td class="memItemLeft" align="right" valign="top"><a id="ab32cd46d7f0cf524d79e4ba7da7449dd"></a>
void *&#160;</td><td class="memItemRight" valign="bottom"><b>mutable_cpu_data</b> ()</td></tr>
<tr class="separator:ab32cd46d7f0cf524d79e4ba7da7449dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6ca4faa7233c8ac2319acb72ba0441e"><td class="memItemLeft" align="right" valign="top"><a id="ab6ca4faa7233c8ac2319acb72ba0441e"></a>
void *&#160;</td><td class="memItemRight" valign="bottom"><b>mutable_gpu_data</b> ()</td></tr>
<tr class="separator:ab6ca4faa7233c8ac2319acb72ba0441e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd3e8f08d0186d3460fcce1378a2dc4c"><td class="memItemLeft" align="right" valign="top"><a id="abd3e8f08d0186d3460fcce1378a2dc4c"></a>
SyncedHead&#160;</td><td class="memItemRight" valign="bottom"><b>head</b> ()</td></tr>
<tr class="separator:abd3e8f08d0186d3460fcce1378a2dc4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae181c18b137d62de33bc91501aabb841"><td class="memItemLeft" align="right" valign="top"><a id="ae181c18b137d62de33bc91501aabb841"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>size</b> ()</td></tr>
<tr class="separator:ae181c18b137d62de33bc91501aabb841"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16308ac4986b99fb62303c4f4c1d118b"><td class="memItemLeft" align="right" valign="top"><a id="a16308ac4986b99fb62303c4f4c1d118b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>async_gpu_push</b> (const cudaStream_t &amp;stream)</td></tr>
<tr class="separator:a16308ac4986b99fb62303c4f4c1d118b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Manages memory allocation and synchronization between the host (CPU) and device (GPU). </p>
<p>TODO(dox): more thorough description. </p>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li>include/caffe/<a class="el" href="syncedmem_8hpp_source.html">syncedmem.hpp</a></li>
<li>src/caffe/syncedmem.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Aug 3 2017 23:11:30 for Caffe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
